using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CodeWork.BLL;
using CodeWork.Library.Web;

public partial class public_Login : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        InitControls();
    }

    private void InitControls()
    {
        ibtLogin.ImageUrl = "~/App_Themes/" + Page.StyleSheetTheme + "/images/login.png";
    }

    protected void Login_Click(object sender, ImageClickEventArgs e)
    {
        if (Page.IsValid)
        {
            if (UserManager.LoginUser(tbxUserId.Text, tbxPassword.Text))
                Response.Redirect("~/private/home.aspx");
            else
                lblLoginErrorMessage.Visible = true;
        }
    }
}
